# Copyright (C) Kumo inc. and its affiliates.
# Author: Jeff.li lijippy@163.com
# All rights reserved.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <https:#www.gnu.org/licenses/>.
#
include_guard(GLOBAL)

# GEOS Configuration
set(POLLUX_GEOS_BUILD_VERSION 3.13.0)
set(POLLUX_GEOS_BUILD_SHA256_CHECKSUM
    47ec83ff334d672b9e4426695f15da6e6368244214971fabf386ff8ef6df39e4)
string(CONCAT POLLUX_GEOS_SOURCE_URL "https://download.osgeo.org/geos/"
              "geos-${POLLUX_GEOS_BUILD_VERSION}.tar.bz2")

pollux_resolve_dependency_url(GEOS)

FetchContent_Declare(
  geos
  URL ${POLLUX_GEOS_SOURCE_URL}
  URL_HASH ${POLLUX_GEOS_BUILD_SHA256_CHECKSUM})
set(BUILD_SHARED_LIBS ${POLLUX_BUILD_SHARED})
FetchContent_MakeAvailable(geos)
unset(BUILD_SHARED_LIBS)
